<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 <%
 	String path = request.getContextPath();
 	request.setAttribute("path", path);
 %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<link href="${path}/css/styles.css" rel="stylesheet">
<link href="${path}/css/bootstraps.min.css" rel="stylesheet">

<script type="text/javascript" src="${path}/js/jquery.min.js"></script>
<script src="${path}/js/bootstrap.min.js"></script>


<script type="text/javascript">

		 // 正常提交表单
		function userUpdate(){
			//使用js进行表单检查
			 var staffNum = $("#staffNums").val();
			var pwd = $("#pwds").val();
			var chnName=$("#chnNames").val();
			var mobile=$("#mobiles").val();
			
			 if($.trim(staffNum)=='' || $.trim(chnName)=='' || $.trim(pwd)==''){
				 alert("请输入必填项信息");
				 return;
			 } 
			 if($.trim(mobile).length>0){
				 if($.trim(mobile).length!=11){
					 alert("手机长度必须为11位");
					 return;
				 }
			 }
			$("#updateForm").submit();
		}
		

  </script>

</head>
<body>
	<form id="updateForm" action="${path}/auth/staff/updatePwd"
		method="post">
		<div class="form-group">
			<input type="hidden" class="form-control" name="staffId" id="staffId"
				value="${info.staffId }" />
		</div>
		<div class="form-group">
			<label for="staffNums" class="control-label">账号：</label> <input
				type="text" class="form-control" name="staffNum" id="staffNums"
				value="${info.staffNum }" placeholder="(必填项)"/>
		</div>
		<div class="form-group">
			<label for="chnNames" class="control-label">姓名：</label> <input
				type="text" class="form-control" name="chnName" id="chnNames"
				value="${info.chnName }" placeholder="(必填项)"/>
		</div>
		<div class="form-group">
			<label for="surName" class="control-label">英文全名：</label> <input
				type="text" class="form-control" name="surName" id="surName"
				value="${info.surName }" />
		</div>
		<div class="form-group">
			<label for="pwds" class="control-label">密码：</label> <input type="password"
				class="form-control" name="pwd" id="pwds" value="${info.pwd }" placeholder="(必填项)"/>
		</div>
		<div class="form-group">
			<label for="mobiles" class="control-label">手机：</label> <input
				type="text" class="form-control" name="mobile" id="mobiles"
				value="${info.mobile }"  placeholder="(必填项)"/>
		</div>
		<div class="modal-footer">
			<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			<input type="button" class="btn btn-primary" name="updateButton" value="修改" onclick="userUpdate();"/>
		</div>
	</form>

</body>
</html>